--       _________ __                 __                               
--      /   _____//  |_____________ _/  |______     ____  __ __  ______
--      \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
--      /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \ 
--     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
--             \/                  \/          \//_____/            \/ 
--  ______________________                           ______________________
--			  T H E   W A R   B E G I N S
--	   Stratagus - A free fantasy real time strategy game engine
--      buttons.lua - Buttons
--
--      (c) Copyright 2005 by David Stone
--
--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation; either version 2 of the License, or
--      (at your option) any later version.
--  
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--  
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------


--Some nice buttons for every race
DefineButton( { Pos = 9, Level = 9, Icon = "icon-cancel",
	Action = "cancel",
	Key = "c", Hint = "~!CANCEL",
	ForUnit = {"*"} } )
DefineButton( { Pos = 9, Level = 0, Icon = "icon-cancel",
	Action = "cancel-upgrade",
	Key = "c", Hint = "~!CANCEL UPGRADE",
	ForUnit = {"cancel-upgrade"} } )
DefineButton( { Pos = 9, Level = 0, Icon = "icon-cancel",
	Action = "cancel-train-unit",
	Key = "c", Hint = "~!CANCEL UNIT TRAINING",
	ForUnit = {"*"} } )
DefineButton( { Pos = 9, Level = 0, Icon = "icon-cancel",
	Action = "cancel-build",
	Key = "c", Hint = "~!CANCEL CONSTRUCTION",
	ForUnit = {"cancel-build"} } )


DefineButton( { Pos = 5, Level = 1, Icon = "icon-move",
	Action = "move",
	Key = "5", Hint = "MOVE", 
	ForUnit = {"unit-tank","unit-sub","unit-transport", "unit-sub-submerged",
	"unit-inf", "unit-fighter", "unit-bomber","unit-battleship","unit-carrier", "humans-group" } } )
DefineButton( { Pos = 4, Level = 1, Icon = "icon-stop",
	Action = "stop",
	Key = "4", Hint = "STOP", 
	ForUnit = {"unit-tank","unit-sub","unit-transport", "unit-sub-submerged",
	"unit-inf", "unit-fighter", "unit-bomber","unit-battleship","unit-carrier", "humans-group" } } )
DefineButton( { Pos = 1, Level = 1, Icon = "icon-attack",
	Action = "attack",
	Key = "1", Hint = "ATTACK",
	ForUnit = {"unit-tank","unit-sub","unit-transport", "unit-inf-dug",
	"unit-inf", "unit-fighter", "unit-bomber","unit-battleship","unit-carrier", "unit-aa", "humans-group"} } )
DefineButton( { Pos = 2, Level = 1, Icon = "icon-stand",
	Action = "stand-ground",
	Key = "2", Hint = "STAND ON GROUND",
	ForUnit = {"unit-tank","unit-sub","unit-transport", "unit-sub-submerged",
	"unit-inf", "unit-fighter", "unit-bomber","unit-battleship","unit-carrier", "humans-group"} } )
DefineButton( { Pos = 3, Level = 1, Icon = "icon-patrol",
	Action = "patrol",
	Key = "3", Hint = "PATROL",
	ForUnit = {"unit-tank","unit-sub","unit-transport", "unit-sub-submerged",
	"unit-inf", "unit-fighter", "unit-bomber","unit-battleship","unit-carrier", "humans-group"} } )
DefineButton( { Pos = 6, Level = 1, Icon = "icon-patrol",
	Action = "repair",
	Key = "6", Hint = "REPAIR",
	ForUnit = {"unit-tank", "unit-inf"} } )

DefineButton( { Pos = 6, Level = 1, Icon = "icon-patrol",
	Action = "harvest",
	Key = "6", Hint = "HARVEST",
	ForUnit = {"unit-fighter"} } )
	
DefineButton( { Pos = 1, Level = 0, Icon = "icon-attack",
  Action = "button", Value = 1,
  Key = "1", Hint = "Actions (~!1)",
  ForUnit = {"unit-tank","unit-sub","unit-transport", "unit-inf-dug", "unit-sub-submerged",
	"unit-inf", "unit-fighter", "unit-bomber","unit-battleship","unit-carrier", "humans-group"} } )	
		
DefineButton( {Pos = 7, Level = 0, Icon = "icon-unload",
	Action = "unload",
	Key = "7", Hint = "Unload (~!z)",
	ForUnit = {"unit-transport"} } )
DefineButton( {Pos = 7, Level = 1, Icon = "icon-unload",
	Action = "cast-spell", Value = "spell-capture",
	Key = "7", Hint = "Capture (~!z)",
	ForUnit = {"unit-inf", "unit-tank"} } )
				
		
DefineButton( { Pos = 1, Level = 0, Icon = "icon-inf",
	Action = "train-unit", Value = "unit-inf",
	Key = "1", Hint = "Purchase Infantry (~!1)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 2, Level = 0, Icon = "icon-tank",
	Action = "train-unit", Value = "unit-tank",
	Key = "2", Hint = "Purchase Armor (~!w)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 9, Level = 0, Icon = "icon-sub",
	Action = "train-unit", Value = "unit-sub",
	Key = "9", Hint = "Purchase Submarine (~!c)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 8, Level = 0, Icon = "icon-transport",
	Action = "train-unit", Value = "unit-transport",
	Key = "8", Hint = "Purchase Transport (~!x)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 3, Level = 0, Icon = "icon-fighter",
	Action = "train-unit", Value = "unit-fighter",
	Key = "3", Hint = "Purchase Fighter (~!e)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 4, Level = 0, Icon = "icon-bomber",
	Action = "train-unit", Value = "unit-bomber",
	Key = "4", Hint = "Purchase Bomber (~!a)",
	ForUnit = {"unit-ic"} } )				
DefineButton( { Pos = 6, Level = 0, Icon = "icon-battleship",
	Action = "train-unit", Value = "unit-battleship",
	Key = "6", Hint = "Purchase Battleship (~!d)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 7, Level = 0, Icon = "icon-carrier",
	Action = "train-unit", Value = "unit-carrier",
	Key = "7", Hint = "Purchase Aircraft Carrier (~!z)",
	ForUnit = {"unit-ic"} } )
DefineButton( { Pos = 5, Level = 0, Icon = "icon-aa",
	Action = "build", Value = "unit-aa",
	Key = "5", Hint = "Purchase AntiAircraft (~!s)",
	ForUnit = {"unit-ic"} } )

DefineButton( { Pos = 11, Level = 0, Icon = "icon-inf",
	Action = "cast-spell", Value = "spell-digin",
	Key = "q", Hint = "Dig In (~!q)",
	ForUnit = {"unit-inf"} } )

DefineButton( { Pos = 11, Level = 0, Icon = "icon-inf",
	Action = "cast-spell", Value = "spell-digout",
	Key = "q", Hint = "Get up (~!q)",
	ForUnit = {"unit-inf-dug"} } )	

DefineButton( { Pos = 11, Level = 0, Icon = "icon-sub",
	Action = "cast-spell", Value = "spell-submerge",
	Key = "q", Hint = "Submerge (~!q)",
	ForUnit = {"unit-sub"} } )	

DefineButton( { Pos = 11, Level = 0, Icon = "icon-sub",
	Action = "cast-spell", Value = "spell-merge",
	Key = "q", Hint = "Merge (~!q)",
	ForUnit = {"unit-sub-submerged"} } )
	
DefineButton( { Pos = 1, Level = 0, Icon = "icon-ic",
	Action = "build", Value = "unit-ic",
	Key = "8", Hint = "Build Industrial Complex (~!c)",
	ForUnit = {"unit-one", "unit-two",
	"unit-three", "unit-four", "unit-five", "unit-six", "unit-seven", "unit-eight",
	"unit-nine", "unit-ten", "unit-eleven", "unit-twelve", "unit-thirteen", 
	"unit-fourteen", "unit-fifteen"} } )
